package com.xiangge.abstract1;

import com.xiangge.domain.Goods;

public class AbstractTest45 {
    public static void main(String[] args) {
        Goods goods = new Goods(001, "iPhone 13", 100, 799.99, true);

        // 测试计算商品价格方法
        double totalPrice = goods.calculatePrice(5);
        System.out.println("5台iPhone 13的总价是：" + totalPrice);

        // 测试修改库存数量方法
        goods.updateStock(20);
        System.out.println("修改库存后剩余库存量：" + goods.getStock());

        // 打印商品信息
        System.out.println(goods);
    }
}
